package com.andatsoft.laisim.theme;

import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;

public class Skin {

	private boolean mHasTheme = false;
	private String mSkinName;
	private String mAuthorName;
	private String mAuthorInfo;

	public boolean hasTheme() {
		return mHasTheme;
	}

	public void setmHasTheme(boolean mHasTheme) {
		this.mHasTheme = mHasTheme;
	}

	public String getAuthorName() {
		return mAuthorName;
	}

	public void setAuthorName(String mAuthorName) {
		this.mAuthorName = mAuthorName;
	}

	public String getAuthorInfo() {
		return mAuthorInfo;
	}

	public void setAuthorInfo(String mAuthorInfo) {
		this.mAuthorInfo = mAuthorInfo;
	}

	public String getSkinName() {
		return mSkinName;
	}

	public void setSkinName(String skinName) {
		this.mSkinName = skinName;
	}

	// //////////////////////////////////////////////////////
	// Main screen
	// /////////////////////////////////////////////////////
	private Drawable mFavoriteBtnOff;
	private Drawable mFavoriteBtnOn;

	private Drawable mBassBtnOn;
	private Drawable mBassBtnOff;
	private Drawable mEqBtnOff;
	private Drawable mEqBtnOn;

	private Drawable mShuffleBtnOn;
	private Drawable mShuffleBtnOff;
	private Drawable mRepeatBtnOff;
	private Drawable mRepeatBtnOne;
	private Drawable mRepeatBtnAll;

	private Drawable mPrevBtnNormal;
	private Drawable mPrevBtnPressed;
	private Drawable mNextBtnNormal;
	private Drawable mNextBtnPressed;

	private Drawable mPlayBtnNormal;
	private Drawable mPlayBtnPressed;
	private Drawable mPauseBtnNormal;
	private Drawable mPauseBtnPressed;

	private String mProgressBarHorizontalBackgroundColor;
	private String mProgressBarHorizontalProgressColor;

	private float mProgressBarHorizontalBackgroundWidth;
	private float mProgressBarHorizontalProgressWidth;

	private Drawable mDefaultAlbum;

	public int getProgressBarHorizontalBackgroundColor() {
		return Color.parseColor(mProgressBarHorizontalBackgroundColor);
	}

	public void setProgressBarHorizontalBackgroundColor(
			String mProgressBarBackgroundColor) {
		this.mProgressBarHorizontalBackgroundColor = mProgressBarBackgroundColor;
	}

	public int getProgressBarHorizontalProgressColor() {
		return Color.parseColor(mProgressBarHorizontalProgressColor);
	}

	public void setProgressBarHorizontalProgressColor(
			String mProgressBarProgressColor) {
		this.mProgressBarHorizontalProgressColor = mProgressBarProgressColor;
	}

	public float getProgressBarHorizontalBackgroundWidth() {
		return mProgressBarHorizontalBackgroundWidth;
	}

	public void setProgressBarHorizontalBackgroundWidth(
			float mProgressBarBackgroundWidth) {
		this.mProgressBarHorizontalBackgroundWidth = mProgressBarBackgroundWidth;
	}

	public float getProgressBarHorizontalProgressWidth() {
		return mProgressBarHorizontalProgressWidth;
	}

	public void setProgressBarHorizontalProgressWidth(
			float mProgressBarProgressWidth) {
		this.mProgressBarHorizontalProgressWidth = mProgressBarProgressWidth;
	}

	public Drawable getFavoriteBtnOff() {
		return mFavoriteBtnOff;
	}

	public void setFavoriteBtnOff(Drawable mFavoriteBtnOff) {
		this.mFavoriteBtnOff = mFavoriteBtnOff;
	}

	public Drawable getFavoriteBtnOn() {
		return mFavoriteBtnOn;
	}

	public void setFavoriteBtnOn(Drawable mFavoriteBtnOn) {
		this.mFavoriteBtnOn = mFavoriteBtnOn;
	}

	public Drawable getBassBtnOn() {
		return mBassBtnOn;
	}

	public void setBassBtnOn(Drawable mBassBtnOn) {
		this.mBassBtnOn = mBassBtnOn;
	}

	public Drawable getBassBtnOff() {
		return mBassBtnOff;
	}

	public void setBassBtnOff(Drawable mBassBtnOff) {
		this.mBassBtnOff = mBassBtnOff;
	}

	public Drawable getEqBtnOff() {
		return mEqBtnOff;
	}

	public void setEqBtnOff(Drawable mEqBtnOff) {
		this.mEqBtnOff = mEqBtnOff;
	}

	public Drawable getEqBtnOn() {
		return mEqBtnOn;
	}

	public void setEqBtnOn(Drawable mEqBtnOn) {
		this.mEqBtnOn = mEqBtnOn;
	}

	public Drawable getShuffleBtnOn() {
		return mShuffleBtnOn;
	}

	public void setShuffleBtnOn(Drawable mShuffleBtnOn) {
		this.mShuffleBtnOn = mShuffleBtnOn;
	}

	public Drawable getShuffleBtnOff() {
		return mShuffleBtnOff;
	}

	public void setShuffleBtnOff(Drawable mShuffleBtnOff) {
		this.mShuffleBtnOff = mShuffleBtnOff;
	}

	public Drawable getRepeatBtnOff() {
		return mRepeatBtnOff;
	}

	public void setRepeatBtnOff(Drawable mRepeatBtnOff) {
		this.mRepeatBtnOff = mRepeatBtnOff;
	}

	public Drawable getRepeatBtnOne() {
		return mRepeatBtnOne;
	}

	public void setRepeatBtnOne(Drawable mRepeatBtnOne) {
		this.mRepeatBtnOne = mRepeatBtnOne;
	}

	public Drawable getRepeatBtnAll() {
		return mRepeatBtnAll;
	}

	public void setRepeatBtnAll(Drawable mRepeatBtnAll) {
		this.mRepeatBtnAll = mRepeatBtnAll;
	}

	public Drawable getPrevBtnNormal() {
		return mPrevBtnNormal;
	}

	public void setPrevBtnNormal(Drawable mPrevBtnNormal) {
		this.mPrevBtnNormal = mPrevBtnNormal;
	}

	public Drawable getPrevBtnPressed() {
		return mPrevBtnPressed;
	}

	public void setPrevBtnPressed(Drawable mPrevBtnPressed) {
		this.mPrevBtnPressed = mPrevBtnPressed;
	}

	public Drawable getNextBtnNormal() {
		return mNextBtnNormal;
	}

	public void setNextBtnNormal(Drawable mNextBtnNormal) {
		this.mNextBtnNormal = mNextBtnNormal;
	}

	public Drawable getNextBtnPressed() {
		return mNextBtnPressed;
	}

	public void setNextBtnPressed(Drawable mNextBtnPressed) {
		this.mNextBtnPressed = mNextBtnPressed;
	}

	public Drawable getPlayBtnNormal() {
		return mPlayBtnNormal;
	}

	public void setPlayBtnNormal(Drawable mPlayBtnNormal) {
		this.mPlayBtnNormal = mPlayBtnNormal;
	}

	public Drawable getPlayBtnPressed() {
		return mPlayBtnPressed;
	}

	public void setPlayBtnPressed(Drawable mPlayBtnPressed) {
		this.mPlayBtnPressed = mPlayBtnPressed;
	}

	public Drawable getPauseBtnNormal() {
		return mPauseBtnNormal;
	}

	public void setPauseBtnNormal(Drawable mPauseBtnNormal) {
		this.mPauseBtnNormal = mPauseBtnNormal;
	}

	public Drawable getPauseBtnPressed() {
		return mPauseBtnPressed;
	}

	public void setPauseBtnPressed(Drawable mPauseBtnPressed) {
		this.mPauseBtnPressed = mPauseBtnPressed;
	}

	public Drawable getDefaultAlbum() {
		return mDefaultAlbum;
	}

	public void setDefaultAlbum(Drawable defaultAlbum) {
		this.mDefaultAlbum = defaultAlbum;
	}

	// //////////////////////////////////////////////////////
	// End Main screen
	// /////////////////////////////////////////////////////

	// //////////////////////////////////////////////////////
	// Library Screen
	// /////////////////////////////////////////////////////

	private Drawable mLibScreenMostPlayed;
	private Drawable mLibScreenFavorite;
	private Drawable mLibScreenAllSong;
	private Drawable mLibScreenAlbum;
	private Drawable mLibScreenArtist;
	private Drawable mLibScreenGenre;
	private Drawable mLibScreenPlayList;
	private Drawable mLibScreenFolder;
	private Drawable mLibScreenHasLyrics;

	public Drawable getLibScreenMostPlayed() {
		return mLibScreenMostPlayed;
	}

	public void setLibScreenMostPlayed(Drawable mLibScreenMostPlayed) {
		this.mLibScreenMostPlayed = mLibScreenMostPlayed;
	}

	public Drawable getLibScreenFavorite() {
		return mLibScreenFavorite;
	}

	public void setLibScreenFavorite(Drawable mLibScreenFavorite) {
		this.mLibScreenFavorite = mLibScreenFavorite;
	}

	public Drawable getLibScreenAllSong() {
		return mLibScreenAllSong;
	}

	public void setLibScreenAllSong(Drawable mLibScreenAllSong) {
		this.mLibScreenAllSong = mLibScreenAllSong;
	}

	public Drawable getLibScreenAlbum() {
		return mLibScreenAlbum;
	}

	public void setLibScreenAlbum(Drawable mLibScreenAlbum) {
		this.mLibScreenAlbum = mLibScreenAlbum;
	}

	public Drawable getLibScreenArtist() {
		return mLibScreenArtist;
	}

	public void setLibScreenArtist(Drawable mLibScreenArtist) {
		this.mLibScreenArtist = mLibScreenArtist;
	}

	public Drawable getLibScreenGenre() {
		return mLibScreenGenre;
	}

	public void setLibScreenGenre(Drawable mLibScreenGenre) {
		this.mLibScreenGenre = mLibScreenGenre;
	}

	public Drawable getLibScreenPlayList() {
		return mLibScreenPlayList;
	}

	public void setLibScreenPlayList(Drawable mLibScreenPlayList) {
		this.mLibScreenPlayList = mLibScreenPlayList;
	}

	public Drawable getLibScreenFolder() {
		return mLibScreenFolder;
	}

	public void setLibScreenFolder(Drawable mLibScreenFolder) {
		this.mLibScreenFolder = mLibScreenFolder;
	}

	public Drawable getLibScreenHasLyrics() {
		return mLibScreenHasLyrics;
	}

	public void setLibScreenHasLyrics(Drawable mLibScreenHasLyrics) {
		this.mLibScreenHasLyrics = mLibScreenHasLyrics;
	}

	// //////////////////////////////////////////////////////
	// End Library Screen
	// /////////////////////////////////////////////////////
	// //////////////////////////////////////////////////////
	// Sound Effect Screen
	// /////////////////////////////////////////////////////
	private Drawable mProgressVerticalThumbNormal;
	private Drawable mProgressVerticalThumbPressed;
	private String mProgressVerticalBackgroundColor;
	private float mProgressVerticalBackgroundWidth;
	private String mProgressVerticalInnerColorPressed;

	private Drawable mProgressCircularBackgroundNormal;
	private Drawable mProgressCircularBackgroundPressed;
	private Drawable mProgressCircularThumb;
	private Drawable mEffectActivityAboveBackground;
	private Drawable mEffectActivityBelowBackground;

	private Drawable mBtnEffectAMS;
	private Drawable mBtnEffectAMG;
	private Drawable mBtnEffectAMA;

	private Drawable mBtnEffectEqOffOff;
	private Drawable mBtnEffectEqOnOff;
	private Drawable mBtnEffectEqOnOn;
	private Drawable mBtnEffectEqOffOn;
	private Drawable mBtnEffectBassOffOff;
	private Drawable mBtnEffectBassOnOff;
	private Drawable mBtnEffectBassOnOn;
	private Drawable mBtnEffectBassOffOn;
	private Drawable mBtnEffectReset;

	public Drawable getProgressVerticalThumbNormal() {
		return mProgressVerticalThumbNormal;
	}

	public void setProgressVerticalThumbNormal(Drawable ProgressThumb) {
		this.mProgressVerticalThumbNormal = ProgressThumb;
	}

	public Drawable getProgressVerticalThumbPressed() {
		return mProgressVerticalThumbPressed;
	}

	public void setProgressVerticalThumbPressed(Drawable ProgressThumb) {
		this.mProgressVerticalThumbPressed = ProgressThumb;
	}

	public Drawable getProgressCircularBackgroundNormal() {
		return mProgressCircularBackgroundNormal;
	}

	public void setProgressCircularBackgroundNormal(Drawable ProgressCircular) {
		this.mProgressCircularBackgroundNormal = ProgressCircular;
	}

	public Drawable getProgressCircularBackgroundPressed() {
		return mProgressCircularBackgroundPressed;
	}

	public void setProgressCircularBackgroundPressed(Drawable ProgressCircular) {
		this.mProgressCircularBackgroundPressed = ProgressCircular;
	}

	public Drawable getProgressCircularThumb() {
		return mProgressCircularThumb;
	}

	public void setProgressCircularThumb(Drawable ProgressCircular) {
		this.mProgressCircularThumb = ProgressCircular;
	}

	public Drawable getEffectActivityAboveBackground() {
		return mEffectActivityAboveBackground;
	}

	public void setEffectActivityAboveBackground(Drawable value) {
		this.mEffectActivityAboveBackground = value;
	}

	public Drawable getEffectActivityBelowBackground() {
		return mEffectActivityBelowBackground;
	}

	public void setEffectActivityBelowBackground(Drawable value) {
		this.mEffectActivityBelowBackground = value;
	}

	public int getProgressVerticalBackgroundColor() {
		return Color.parseColor(this.mProgressVerticalBackgroundColor);
	}

	public void setProgressVerticalBackgroundColor(String color) {
		this.mProgressVerticalBackgroundColor = color;
	}

	public float getProgressVerticalBackgroundWidth() {
		return this.mProgressVerticalBackgroundWidth;
	}

	public void setProgressVerticalBackgroundWidth(float w) {
		this.mProgressVerticalBackgroundWidth = w;
	}

	public int getProgressVerticalInnerColorPressed() {
		return Color.parseColor(this.mProgressVerticalInnerColorPressed);
	}

	public void setProgressVerticalInnerColorPressed(String color) {
		this.mProgressVerticalInnerColorPressed = color;
	}

	public Drawable getBtnEffectAMS() {
		return mBtnEffectAMS;
	}

	public void setBtnEffectAMS(Drawable mBtnEffectAMS) {
		this.mBtnEffectAMS = mBtnEffectAMS;
	}

	public Drawable getBtnEffectAMG() {
		return mBtnEffectAMG;
	}

	public void setBtnEffectAMG(Drawable mBtnEffectAMG) {
		this.mBtnEffectAMG = mBtnEffectAMG;
	}

	public Drawable getBtnEffectAMA() {
		return mBtnEffectAMA;
	}

	public void setBtnEffectAMA(Drawable mBtnEffectAMA) {
		this.mBtnEffectAMA = mBtnEffectAMA;
	}

	public Drawable getBtnEffectEqOffOff() {
		return mBtnEffectEqOffOff;
	}

	public void setBtnEffectEqOffOff(Drawable mBtnEffectEqOffOff) {
		this.mBtnEffectEqOffOff = mBtnEffectEqOffOff;
	}

	public Drawable getBtnEffectEqOnOff() {
		return mBtnEffectEqOnOff;
	}

	public void setBtnEffectEqOnOff(Drawable mBtnEffectEqOnOff) {
		this.mBtnEffectEqOnOff = mBtnEffectEqOnOff;
	}

	public Drawable getBtnEffectEqOnOn() {
		return mBtnEffectEqOnOn;
	}

	public void setBtnEffectEqOnOn(Drawable mBtnEffectEqOnOn) {
		this.mBtnEffectEqOnOn = mBtnEffectEqOnOn;
	}

	public Drawable getBtnEffectEqOffOn() {
		return mBtnEffectEqOffOn;
	}

	public void setBtnEffectEqOffOn(Drawable mBtnEffectEqOffOn) {
		this.mBtnEffectEqOffOn = mBtnEffectEqOffOn;
	}

	public Drawable getBtnEffectBassOffOff() {
		return mBtnEffectBassOffOff;
	}

	public void setBtnEffectBassOffOff(Drawable mBtnEffectBassOffOff) {
		this.mBtnEffectBassOffOff = mBtnEffectBassOffOff;
	}

	public Drawable getBtnEffectBassOnOff() {
		return mBtnEffectBassOnOff;
	}

	public void setBtnEffectBassOnOff(Drawable mBtnEffectBassOnOff) {
		this.mBtnEffectBassOnOff = mBtnEffectBassOnOff;
	}

	public Drawable getBtnEffectBassOnOn() {
		return mBtnEffectBassOnOn;
	}

	public void setBtnEffectBassOnOn(Drawable mBtnEffectBassOnOn) {
		this.mBtnEffectBassOnOn = mBtnEffectBassOnOn;
	}

	public Drawable getBtnEffectBassOffOn() {
		return mBtnEffectBassOffOn;
	}

	public void setBtnEffectBassOffOn(Drawable mBtnEffectBassOffOn) {
		this.mBtnEffectBassOffOn = mBtnEffectBassOffOn;
	}

	public Drawable getBtnEffectReset() {
		return mBtnEffectReset;
	}

	public void setBtnEffectReset(Drawable mBtnEffectReset) {
		this.mBtnEffectReset = mBtnEffectReset;
	}

	// //////////////////////////////////////////////////////
	// End Sound effect Screen
	// /////////////////////////////////////////////////////

	private void releaseDrawable(Drawable src) {
		// release native object
		if (src instanceof BitmapDrawable) {
			((BitmapDrawable) src).getBitmap().recycle();
		}
		src = null;
	}

	public void releaseAll() {
		release(ThemeManager.MAIN_ACTIVYTY);
		release(ThemeManager.LIBRARY_ACTIVYTY);
		release(ThemeManager.SOUND_EFFECT_ACTIVYTY);
		release(ThemeManager.PLAYER_SERVICE);
		mAuthorInfo = null;
		mAuthorName = null;
		mSkinName = null;
	}

	public void release(int type) {
		switch (type) {
		case ThemeManager.MAIN_ACTIVYTY:
			releaseDrawable(mFavoriteBtnOff);
			releaseDrawable(mFavoriteBtnOn);

			releaseDrawable(mBassBtnOn);
			releaseDrawable(mBassBtnOff);
			releaseDrawable(mEqBtnOff);
			releaseDrawable(mEqBtnOn);

			releaseDrawable(mShuffleBtnOn);
			releaseDrawable(mShuffleBtnOff);
			releaseDrawable(mRepeatBtnOff);
			releaseDrawable(mRepeatBtnOne);
			releaseDrawable(mRepeatBtnAll);

			releaseDrawable(mPrevBtnNormal);
			releaseDrawable(mPrevBtnPressed);
			releaseDrawable(mNextBtnNormal);
			releaseDrawable(mNextBtnPressed);

			releaseDrawable(mPlayBtnNormal);
			releaseDrawable(mPlayBtnPressed);
			releaseDrawable(mPauseBtnNormal);
			releaseDrawable(mPauseBtnPressed);

			// releaseDrawable(mDefaultAlbum);
			break;

		case ThemeManager.SOUND_EFFECT_ACTIVYTY:
			releaseDrawable(mProgressVerticalThumbNormal);
			releaseDrawable(mProgressVerticalThumbPressed);
			releaseDrawable(mProgressCircularBackgroundNormal);
			releaseDrawable(mProgressCircularBackgroundPressed);
			releaseDrawable(mProgressCircularThumb);

			releaseDrawable(mEffectActivityAboveBackground);
			releaseDrawable(mEffectActivityBelowBackground);

			releaseDrawable(mBtnEffectAMS);
			releaseDrawable(mBtnEffectAMG);
			releaseDrawable(mBtnEffectAMA);

			releaseDrawable(mBtnEffectEqOffOff);
			releaseDrawable(mBtnEffectEqOnOff);
			releaseDrawable(mBtnEffectEqOnOn);
			releaseDrawable(mBtnEffectEqOffOn);
			releaseDrawable(mBtnEffectBassOffOff);
			releaseDrawable(mBtnEffectBassOnOff);
			releaseDrawable(mBtnEffectBassOnOn);
			releaseDrawable(mBtnEffectBassOffOn);
			releaseDrawable(mBtnEffectReset);
			break;

		case ThemeManager.LIBRARY_ACTIVYTY:
			releaseDrawable(mLibScreenMostPlayed);
			releaseDrawable(mLibScreenFavorite);
			releaseDrawable(mLibScreenAllSong);
			releaseDrawable(mLibScreenAlbum);
			releaseDrawable(mLibScreenArtist);
			releaseDrawable(mLibScreenGenre);
			releaseDrawable(mLibScreenPlayList);
			releaseDrawable(mLibScreenFolder);
			releaseDrawable(mLibScreenHasLyrics);
			break;
		case ThemeManager.PLAYER_SERVICE:
			releaseDrawable(mDefaultAlbum);
			break;
		}
	}
}
